﻿@using giaoxuhaison.Models;
@using giaoxuhaison.Common;
@{
    ViewBag.Title = "CategoryDetail";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

@{
    var lstItem = (List<vw_SpecialNewsAll>)ViewData["lstNews"];
    var lstOtherCategory = (List<vw_SpecialNewsAll>)ViewData["lstOtherNews"];
    var lstLinkPath = (List<LinkPath>)ViewData["lstLinkPath"];
    if (lstLinkPath.Count > 0)
    {
        Common.strPath = lstLinkPath[0].LinkPath1.ToString();
    }   
}

<a id="#top"></a>
<div class="LeftGroupNews">    
    <!--load tin moi -->
    @if (lstItem.Count > 0)
    {
        <div class="SadNewsGrpTitle">        
            <b style="color:white;">@lstItem[0].Subject</b>
        </div>        
        <div class="DetailSadGrpNews">
            <div class="DateGrpTitle"><i>Ngày đăng: @lstItem[0].CreationDate.ToString("dd/MM/yyyy")</i></div>
            <div class="NewsGrpContent">
                <!--Nội dung tin--> 
                @{
                var strImg = @Url.Content("~");
                var strContents = lstItem[0].Contents.Replace("~/", strImg);                                        
                 }
                 @MvcHtmlString.Create(strContents)
                <!--Nut back ve dau trang-->
                @*<br />
                <br />
                <div id="DetailBack">
                    <!--Quay ve dau trang -->
                    <a href="#top">
                        <img src='@Url.Content("~/Images/News/back_top_yellow.jpg")' align="absmiddle" />
                        Về đầu trang</a>
                </div> *@ 
            </div>        
        </div>
    }
</div>

<div class="RightGroupNews">
    <div class="RightGroupTitle">
        @Html.Label("TIN/ BÀI MỚI", new { @class = "lblLeftTitle" })                        
    </div>
    <div class="RightGroupContent">
        <!--Hien thi phan loi Chua moi-->        
        <!--Hien thi tin tuc moi cua group-->
        @Html.Action("IndexRightNews", "News")
        @*@Html.Action("NewRightNews", "News")*@
    </div>  
    <div class="RightGroupTitle">
        @Html.Label("SUY NIỆM LỜI CHÚA", new { @class = "lblLeftTitle" })                        
    </div>
    <div class="RightGroupContent">
        <!--Hien thi phan loi Chua moi-->        
        <!--Hien thi tin tuc moi cua group-->
        <!-- load phan thong bao moi -->
        <!--Hien thi phan loi Chua moi-->
        @Html.Action("NewGodTitle", "GodTitle")
    </div> 
</div>

<div class="FootGroupNews">    
    <!--load tin moi -->
    <div class="SadNewsGrpTitle">        
        <b style="color:white;">Các tin khác</b>
    </div>        
    <div class="DetailSadGrpNews">
        <div id="FootDetailNews">
            @if (lstOtherCategory.Count > 0 && lstOtherCategory != null)
            {
                foreach (var item in lstOtherCategory)
                {
                    <div class="FootGrpTitle"><a href='@Url.Action("SadNewsDetail", "Categories", new { NewsID = item.NewsID, GroupID = item.GroupID })'><i>>> @item.Subject</i></a></div>                
                }
            }                                
        </div>
       @* <br />
        <br />
        <div id="DetailBack">
            <!--Quay ve dau trang -->
            <a href="#top">
                <img src='@Url.Content("~/Images/News/back_top_yellow.jpg")' align="absmiddle" />
                Về đầu trang</a>
        </div> *@
    </div>
</div>